package com.blazingredfireball.rouleurlog.ria.control
{
	import com.adobe.cairngorm.control.FrontController;
	import com.blazingredfireball.rouleurlog.ria.event.*;
	import com.blazingredfireball.rouleurlog.ria.command.*;
	
	public class RouleurlogController extends FrontController
	{
		public function RouleurlogController()
		{
			initialiseCommands();
		}
		
		public function initialiseCommands() : void
		{
			addCommand( CreateRideEvent.EVENT_CREATE_RIDE, CreateRideCommand);
			addCommand( GetRidesEvent.EVENT_GET_RIDES, GetRidesCommand);
			addCommand( UpdateRideEvent.EVENT_UPDATE_RIDE, UpdateRideCommand);
			addCommand( DeleteRideEvent.EVENT_DELETE_RIDE, DeleteRideCommand);
			
			addCommand( LoginEvent.EVENT_LOGIN, LoginCommand);
			addCommand( RegisterEvent.EVENT_REGISTER, RegisterCommand);
			
  			addCommand( CreateBikeEvent.EVENT_CREATE_BIKE, CreateBikeCommand );
			addCommand( GetBikesEvent.EVENT_GET_BIKES, GetBikesCommand );
			addCommand( UpdateBikeEvent.EVENT_UPDATE_BIKE, UpdateBikeCommand );
			addCommand( DeleteBikeEvent.EVENT_DELETE_BIKE, DeleteBikeCommand );
			
			addCommand( CreateRouteEvent.EVENT_CREATE_ROUTE, CreateRouteCommand );
			addCommand( GetRoutesEvent.EVENT_GET_ROUTES, GetRoutesCommand );
			addCommand( UpdateRouteEvent.EVENT_UPDATE_ROUTE, UpdateRouteCommand );
			addCommand( DeleteRouteEvent.EVENT_DELETE_ROUTE, DeleteRouteCommand );


		}	
	}
	
}